<?php
include($GLOBALS['LNG'].$_SESSION[$SESSLG]."/main.settings.php");
include($GLOBALS['LNG'].$_SESSION[$SESSLG]."/mod.clients.php");

require_once($_SERVER['DOCUMENT_ROOT'].'/defaultconf.mex');

$id_request =  $_GET['RSID'];


MYTCONN();
$MYT = $GLOBALS['MYT'];
$MD = 'ED';

$Dados_Request = $GLOBALS['MYT']->db_array("SELECT * FROM systemoffice.comercial_request
						WHERE ref = {$id_request}");

form_pr('update_ticket','','','post');
?>

<div id="bgnd" style="margin:4px">

<p>&nbsp;</p>

<table  width="637" border="0" cellpadding="1" align=center cellspacing="4" bgcolor="#F2F2F2" >
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>               <div class="button">
          <p>
           <input type="button" style="margin:10px;height:20px;width:100px" value="Actualizar" onclick="
           	document.update_ticket.action='modules/pedido a comerciais/update.php?id=<?php echo $id_request ?>';
			subform('update_ticket','bgnd');"/>
          </p>
           </div>
  </tr>

<tr>
    <td><b>Pedido de Visita N&uacute;mero</td>
	<label name="id1" id="id1">
	    <input name="id" type="text" id="id" disabled="disabled" bgcolor="#F2F2F2" value="<?php echo $id_request ?>" />
	</label>
	<td>&nbsp;</td>
    <td>&nbsp;</td>
</tr>
  

  <tr>
    <td width="200"><b>Nome:</b></td>
    <td width="183"><label name="nome" id="nome">
        <input name="nome" type="text" id="nome" disabled="disabled" bgcolor="#F2F2F2" value="<?php echo $Dados_Request[1]['main_users_ref']; ?>" />
      </label></td>
    <td width="132"><b>Balcão:</td>
    <td width="94">      <label>
        <input name="balcao" type="text" id="balcao" disabled="disabled" value="<?php echo $Dados_Request[1]['main_office_ref']; ?>" />
      </label></td>
  </tr>
  <tr>
    <td><b>Data Pedido:</td>
    <td>      <label>
        <input name="datapedido" type="text" id="datapedido" disabled="disabled" value="<?php echo $Dados_Request[1]['Data_Pedido']; ?>" />
      </label></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

  <tr>
    <td><b>Estado:</td>
    <td>      <label>
        <input name="datapedido" type="text" id="datapedido" disabled="disabled" value="<?php echo $Dados_Request[1]['Estado']; ?>" />
      </label></td>
    <td><b>Atribuir Estado</td>
	<td>	<select name="atribuirestado" id="atribuirestado">
          <option selected="selected"></option>
          <option value="Aberto">Aberto</option>
          <option value="Fechado">Fechado</option>
        </select></td>
  </tr>
    <tr>
    <td><b>Descrição do Pedido de Visita:</td>
    <td>&nbsp;</td>
	 <td>&nbsp;</td>
	  <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="80" colspan="4"><?php echo $Dados_Request[1]['Pedido']; ?></td>
  </tr>
  <tr>
    <td><b>Data Prevista de Visita:</td>
    <td><?php mn_field('date','ED','DataResolucao',$Dados_Request[1]['Data_Visita'],'update_ticket','16','','');?></td>
	    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>

  </tr>
  <tr>
    <td><b>Comercial que irá efectuar a Visita:</td>
    <td>      <label>
        <input name="atribuido" type="text" id="atribuido" disabled="disabled" value="<?php echo $Dados_Request[1]['Comercial']; ?>" />
      </label></td>
    <td><b>Atribuir a:</td>
    <td>
      <label></label>
       <select name="Atribuir" id="Atribuir">
          <option selected></option>
		  <option value="Diego Tonial">Diego Tonial</option>
          <option value="Márcio Araujo">Márcio Araujo</option>          
          <option value="Bruno Santos">Bruno Santos</option>
		  <option value="Diego Tonial">Diego Tonial</option>
		  <option value="Eder Elias">Eder Elias</option>
		   <option value="Danye Ruiz">Danye Ruiz</option>
		  <option value="Ninguém">Ninguém</option>

        </select>
    </td>
  </tr>

      <td><b>Observação:</td>
    <td colspan="2" rowspan="2">      <label>
      <textarea name="obs" cols="60" rows="3" id="obs"><?php echo $Dados_Request[1]['obs']; ?></textarea>
    </label></td>
  <tr>
    <td>&nbsp;</td>


</table>
</div>

</body>
</html>
